package com.oyjd.fw;

import java.util.LinkedHashMap;
import java.util.Map;

/**
 * 
 * 常量定义
 * 
 * @author <b>欧建东<br/>
 *         Email:oyjd@163.com</b>
 * @version 1.0
 */
public class Const {
	// ------------------------系统常用常量
	public static final String SessionKey = "user_info";// Session保存用户信息的key
	public static final String CookieKey = "user_token";// Session保存用户操作模块信息
	public static final String OpKey = "ops";// Session保存用户操作模块信息

	public static final int SUCCESS = 0;// 成功
	public static final int FAIL = 1;// 失败
	public static final int PARA_ERR = 1001;// 请求参数错误
	public static final int UNKOWN_ERR = 1009;// 程序执行未知异常

	// ------------------------jsp资源
	public static final String JSP_goLogin = "/WEB-INF/jsp/sys/login.jsp";
	public static final String JSP_goFramePage = "/WEB-INF/jsp/sys/framePage.jsp";
	public static final String JSP_goHead = "/WEB-INF/jsp/sys/head.jsp";
	public static final String JSP_goMenu = "/WEB-INF/jsp/sys/menu.jsp";
	public static final String JSP_goContent = "/WEB-INF/jsp/sys/content.jsp";
	public static final String JSP_goLoginLog = "/WEB-INF/jsp/sys/loginLog.jsp";

	public static final String JSP_role_list = "/WEB-INF/jsp/role/list.jsp";
	public static final String JSP_role_add = "/WEB-INF/jsp/role/add.jsp";
	public static final String JSP_role_edit = "/WEB-INF/jsp/role/edit.jsp";

	public static final String JSP_user_list = "/WEB-INF/jsp/user/list.jsp";
	public static final String JSP_user_add = "/WEB-INF/jsp/user/add.jsp";
	public static final String JSP_user_edit = "/WEB-INF/jsp/user/edit.jsp";
	public static final String JSP_user_person_edit = "/WEB-INF/jsp/user/personEdit.jsp";
	public static final String JSP_user_person_reset_pwd = "/WEB-INF/jsp/user/personResetPwd.jsp";

	// ------------------------配置型动态常量

	/**
	 * 获取初始化map
	 * 
	 * @return
	 */
	public static Map<String, Object> getJsonMap() {
		Map<String, Object> map = new LinkedHashMap<String, Object>();
		map.put("code", FAIL);
		return map;
	}
}
